<?php
declare (strict_types = 1);

namespace app\api\model;
use think\Collection;
use think\Model;

/**
 * @mixin \think\Model
 */
class SpecGoods extends Model
{
    protected $table='ea_spec_goods';

    /***
     * @param $id
     * @return array|Model|null
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public static function specGoodsDetails($id)
    {
      return self::where('id','=',$id)->find();
    }
    protected $deleteTime = "delete_time";

    public function select($data = null): Collection
    {
        return parent::select($data); // TODO: Change the autogenerated stub
    }

    public function find($data = null)
    {
        return parent::find($data); // TODO: Change the autogenerated stub
    }

    public function getSpecGoodsInfo($goods_id,$value_ids)
    {
        return self::where('goods_id', $goods_id)->where('value_ids', $value_ids)->find();
    }
}
